
from selenium.webdriver.common.by import By
from Base import Base
from time import sleep








class Page(Base):
    search1=(By.ID,'kw')
    onbtn=(By.ID,'su')
    set=(By.NAME,'tj_settingicon')
    tall_h=(By.LINK_TEXT,'高级搜索')
    q1=(By.ID,'adv_keyword')
    q3=(By.XPATH,'//*[@id="advanced"]/div/form/ul/li[1]/div[3]/input')







    def search(self):
        self.send_keys(self.search1,'web端ui自动化')
    def onb(self):
        self.click(self.onbtn)
    def search_ca(self):
        self.ctrl_(self.search1,'a')
    def search_c(self):
        self.ctrl_(self.search1,'c')

    def move_set(self):
        self.move_element(self.set)

    def tohall(self):
        self.click(self.tall_h)
    def to_q1(self):
        self.ctrl_(self.q1,'v')
    def click_q1(self):
        self.double_c(self.q1)
    def zhan_q1(self):
        self.ctrl_(self.q1,'c')
    def to_q3(self):
        self.ctrl_(self.q3,'v')








    def baidu(self):
        self.open_url('https://www.baidu.com')
        self.search()
        self.onb()
        self.search_ca()
        self.search_c()
        self.move_set()
        self.tohall()
        self.to_q1()
        self.click_q1()
        self.zhan_q1()
        self.to_q3()


